Main Page | Class List | Class Members

BustaGraphics Class Reference

contains methods for displaying graphics More...

#include <BustaGraphicsButton.h>

List of all members.

Public Member Functions

void submissionAlert (BustaModelCompleteSandwich *sandwich)
 Alerts the GUI when a sandwich is submitted.
void setSpecialSandwiches (FoodType **special_sandwiches, char **sandwich_names, int num_sandwiches, int num_spSandwiches)
 Set the special sandwiches.
void handleGUIEvent (SDL_Event *event)
 Pass on any SDL_Event to see if it has anything to do with the GUI.
void initSPGameScrn (gcn::ActionListener *al)
 SP Game Screen *********.
void drawSPGame (BustaModelGameState *gs)
 Draws the singleplayer game.
void drawLocalPlayerGame (BustaModelGameState *gs)
 Draws the game state of the local player without calling SDL_Flip().
void addHistory (const char *string)
 Add a new line to the history, scrolling the old text up.Will also wrap the text for you.
void killSPGameScrn ()
 Free all the gui stuff.
void drawMainScreen (MainScrnButton selected)
 Draws the main screen.
void initConnectScrn (gcn::ActionListener *al)
 Initialize the connection screen.
void drawConnectScrn (ConnectScrnStates state, ConnectScrnPlayerList *list)
 Draws the connect screen.
const char * getConnectScrnTextField ()
 Returns the text in the text field.
const char * getServerIPAddress ()
 Returns the server IP address typed in by the player.
const char * getPlayerName ()
 Returns the name typed in by the player.
void killConnectScrn ()
 Kill the connect screen.
void initCharSelScrn (gcn::ActionListener *al)
 Initialize the character selection screen.
void drawCharSelScrn (int local_row, int local_col, int *others_row, int *others_col, char **player_names, int num_players)
 Draws the character selection screen.
void killCharSelScrn ()
 Kill the connect screen.
void initMPGameScrn (gcn::ActionListener *al, BustaModelCharacter *chefID, char **opponent_names, int num_opponents)
 Initialize the Multiplayer game screen.
void setOpponents (BustaModelMPGameState *mp_gs, int num_opponents)
 set the opponents
void drawMPGame (BustaModelGameState *gs, BustaModelMPGameState *mp_gs)
 Draws a window containg a multiplayer game.
void killMPGameScrn ()
 Free up the memory used by the multiplayer game screen.
void drawOpponentBoard (BustaModelGameState gs)
 Draws the opponent's game board.
void drawChefSelelection ()
 Draws the chef selection screen.
void initHighScores (gcn::ActionListener *al)
 Initializes the high scores screen.
void killHighScores ()
 Kills the high scores screen, call on leaving High Score screen.
void drawHighScores (char **HSnames, int *HSscores)
 Draws the high scores screen, first call initHighScores.
void initRankings (gcn::ActionListener *al)
 Draws the rankings screen.
void killRankings ()
 Kills the rankings screen.
void drawRankings (char **names, int numPlayers, BustaModelCharacter *portraits, int *scores)
 Draws the rankings screen.
void drawOptions ()
 Draws the options screen.

Public Attributes

Button bMainScrn [MS_NUM_BUTTONS]
 Data Structure containing the button locations and links.


Detailed Description

contains methods for displaying graphics


Member Function Documentation

void BustaGraphics::addHistory const char *  string  ) 
 

Add a new line to the history, scrolling the old text up.Will also wrap the text for you.

Parameters:
string The new line.

void BustaGraphics::drawCharSelScrn int  local_row,
int  local_col,
int *  others_row,
int *  others_col,
char **  player_names,
int  num_players
 

Draws the character selection screen.

Parameters:
local_row row number of the selected chef of the local player
local_col ditto, but the col number
others_row an array of the row numbers all the other network players current selection
others_col ditto, but the col numbers
player_names an array of player names
num_players the number of network players

void BustaGraphics.drawHighScores char **  HSnames,
int *  HSscores
 

Draws the high scores screen, first call initHighScores.

Parameters:
HSnames A pointer to an array containing name strings
HSscores A pointer to an int array containing scores

void BustaGraphics::drawLocalPlayerGame BustaModelGameState *  gs  ) 
 

Draws the game state of the local player without calling SDL_Flip().

Parameters:
gs A pointer to the Game State.

void BustaGraphics::drawMPGame BustaModelGameState *  gs,
BustaModelMPGameState *  mp_gs
 

Draws a window containg a multiplayer game.

Parameters:
gs A pointer to the Game State.

void BustaGraphics::drawOpponentBoard BustaModelGameState  gs  ) 
 

Draws the opponent's game board.

Parameters:
gs A pointer to the Game State.

void BustaGraphics.drawRankings char **  names,
int  numPlayers,
BustaModelCharacter *  portraits,
int *  scores
 

Draws the rankings screen.

Parameters:
names A pointer to an array containing the player names, in order of rank (1st place, 2nd place, etc.)
numPlayers the number of players

void BustaGraphics::drawSPGame BustaModelGameState *  gs  ) 
 

Draws the singleplayer game.

Calls SDL_Flip()

Parameters:
gs A pointer to the Game State.

const char * BustaGraphics::getConnectScrnTextField  ) 
 

Returns the text in the text field.

Returns an empty if the field is uninitialized

void BustaGraphics::initCharSelScrn gcn::ActionListener *  al  ) 
 

Initialize the character selection screen.

Parameters:
al A pointer to an ActionListener so the GUI knows who to notify when something happens

void BustaGraphics::initConnectScrn gcn::ActionListener *  al  ) 
 

Initialize the connection screen.

Parameters:
al A pointer to an ActionListener so the GUI knows who to notify when something happens

void BustaGraphics.initHighScores gcn::ActionListener *  al  ) 
 

Initializes the high scores screen.

Parameters:
al A pointer to an ActionListener so the GUI knows who to notify when something happens

void BustaGraphics.initRankings gcn::ActionListener *  al  ) 
 

Draws the rankings screen.

Parameters:
al A pointer to an ActionListener so the GUI knows who to notify when something happens

void BustaGraphics::killCharSelScrn  ) 
 

Kill the connect screen.

Free up some precious memory

void BustaGraphics::killConnectScrn  ) 
 

Kill the connect screen.

Free up some precious memory

void BustaGraphics::submissionAlert BustaModelCompleteSandwich *  sandwich  ) 
 

Alerts the GUI when a sandwich is submitted.

Parameters:
sandwich The sandiwch submitted.


Generated on Sun Aug 14 22:24:56 2005 for BustaSandwich Graphics by  doxygen 1.4.2-20050421